    <div class="container top">
 
      <?php
      //flash messages
      if(isset($flash_message)){
        if($flash_message == TRUE)
        {
          echo '<div class="alert alert-success">';
            echo '<a class="close" data-dismiss="alert">×</a>';
            echo '<strong>Well done!</strong> new product created with success.';
          echo '</div>';       
        }else{
          echo '<div class="alert alert-error">';
            echo '<a class="close" data-dismiss="alert">×</a>';
            echo '<strong>Oh snap!</strong> change a few things up and try submitting again.';
          echo '</div>';          
        }
      }
      ?>
      
     
      
          <?php
              foreach($first_term_data as $row)
              {
                 echo '<div class="tablestudentnamefont"><span>Student Name&nbsp;&nbsp;:&nbsp;</span><span>'.$row['student_name'].'</span></div><br/><br/>';
                 echo '<input type="hidden" id="academic_session" name="academic_session" value="'.$row['academic_session'].'">';
                 echo '<input type="hidden" id="real_student_id" name="real_student_id" value="'.$row['student_id'].'">';
                break;
              }
           ?>
           <input type="hidden" id="exam_id" name="exam_id" value="first_term">
           <div style="text-align: center" align="center">
            <table style="text-align: center;width: 50%" align="center" class="globaltable globaltable-striped globaltable-bordered globaltable-condensed">
             <?php
                    echo '<tr>';
                    echo '<th>Subject Name</th>';
                    echo '<th>Attendence</th>';
                    echo '<th>CT</th>';
                    echo '<th>MCQ</th>';
                    echo '<th>CQ</th>';
                    echo '</tr>';
                    
                  foreach($first_term_data as $row)
                  {
                    echo '<tr>';
                    echo '<td style="text-align: center" > '.$row["subject_name"].'<input type="hidden"  name="subject_id[]" value="'.$row["subject_id"].'"></td>';
                    echo '<td> <input type="text"  size="5" style="text-align: center"   name="f_y_1st_att[]" value="'.$row["f_y_1st_att"].'"></td>';
                    echo '<td> <input type="text"  size="5" style="text-align: center"  name="f_y_1st_ct[]" value="'.$row["f_y_1st_ct"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center"   name="f_y_1st_ht_mcq[]" value="'.$row["f_y_1st_ht_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5"style="text-align: center"   name="f_y_1st_ht_cq[]" value="'.$row["f_y_1st_ht_cq"].'"></td>';
                    echo '</tr>';
                  }
                ?>   
             </table>
           </div>
           <div class="form-actions">
            <input type="submit"  value="Save changes" class="btn btn-primary"  size="10" />
            <input type="reset" value="cancle"   size="10"/>
          </div>
      

    </div>
     